package com.mobiporter.adias.tags;

import javax.servlet.jsp.JspException;

import com.mobiporter.adias.core.Manager;
import com.mobiporter.adias.tags.utils.HTMLTagGenerator;

public class PhoneCallLink extends MobiTag 
{

	private static final long serialVersionUID = -11511806600476224L;
	private String number ;
	
	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	@Override
	public void setValueToControl(String value) {}

	@Override
	public int doEndTag() throws JspException 
	{
		return EVAL_PAGE ;
	}

	@Override
	public int doStartTag() throws JspException 
	{
		String href = Manager.getMakePhoneCallString(getUserAgent())+getNumber();
		String link = HTMLTagGenerator.getLink(getId(),getNumber() ,href);
		writeOut(link);
		return SKIP_BODY ;
	}
	
	

	

}
